package com.example.controller;

import com.example.domain.Enterprise;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/book")
public class BookController {
//    @Value("${lesson}")
//    private String lesson;
//    @Value("${server.port}")
//    private Integer port;
//    @Value("${enterprise.subject[0]}")
//    private String subject;
//    @Autowired
//    private Enterprise enterprise;
//    @Autowired
//    private Environment environment;
//    @GetMapping("/{id}")
    @RequestMapping("/hello")
    public String quick1(){
        System.out.println("hello01");
//        System.out.println("id:"+id);
//        System.out.println(lesson+port+subject);
//        System.out.println(enterprise);
//        System.out.println(environment.getProperty("lesson"));
//        System.out.println(environment.getProperty("server.port"));
//        System.out.println(environment.getProperty("enterprise.subject[1]"));
//        return "hello springboot";
        return "hello springboot 2025/3/5 v2";
    }
}
